import { $get, $post } from "@/http";

/**
 * @dir 获取首页轮播图
 */
async function getBanner(brannerFlag) {
  return await $post("/banner/getBannerByFlag", { brannerFlag });
}

/**
 * @dir 获取服务商家数
 */
async function getIndexNumber() {
  return await $post("/getNums");
}

/**
 * @dir 获取评估的
 */

async function getLastApply() {
  return await $post("/financing/getLastApply");
}

async function enterpriseDetails(params) {
  return await $post("/enterprise/detail", params);
}

async function estimateDetail(params) {
  return await $post('/financing/estimateDetail', params);
}


async function financingEstimates(params) {
  return await $post('/financing/estimate', params);
}

async function downLoad({ path, fileName }) {
  return await $post('/download' + path, { fileName });
}


export { getBanner, getIndexNumber, getLastApply, enterpriseDetails, estimateDetail, financingEstimates, downLoad };
